<template>
<div class="global-com">
    <h5 class="title">{{msg}}</h5>
    <p class="title">深度选择器</p>
    <button @click="edit">点击按钮修改文本内容</button>
</div>
</template>

<script setup>
import { ref } from 'vue';

let msg = ref ("全局组件")
function edit() {
    msg.value="修改后的全局组件"
}
</script>

<style>
.global-com{
    border: 1px solid black;
    width: 60px;
    flex: 1; /* 浮动 */
    
}
</style>